import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/home.vue'
import List from '../views/list.vue'
import Querylist from '../views/querylist.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/home',
    name: 'Home',
    component: Home
  },
  {
    path: '/querylist',
    name: 'Querylist',
    component: Querylist
  },
  {
    path: '/list/:xiaoming',
    name: 'List',
    component: List
  },
  {
    path:"/",
    redirect:"/home"
  }
]

const router = new VueRouter({

  base: process.env.BASE_URL,
  routes
})

export default router
